package com.example.abstractfactory8;

import com.example.abstractfactory8.factory.*;

/**
 * @version 1.0.0
 * @className: Test
 * @description:
 * @author: zhangjunfa
 * @date: 2022/6/10 14:41
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("-------------各阶层出门和吃早饭----------------");
        AbstractFactory factory = new HighPersonFactory();
        Car car = factory.getCar();
        BreakFast breakFast = factory.getBreakFast();
        car.gotoWork();
        breakFast.eat();
        System.out.println("-----------------各阶层出门和吃早饭------------------");
    }
}
